package com.whz.bus.consumer;

import lombok.Builder;
import lombok.Data;

import java.io.Serializable;
import java.util.Map;

/**
 * 数据库数据封装类
 *
 * @author whz
 */
@Data
@Builder
public class RelationalChangeData implements Serializable {
    private static final long serialVersionUID = -3937516259898301168L;
    /**
     * 数据库
     */
    private String dbName;
    /**
     * 数据表
     */
    private String tableName;
    /**
     * 变化的行
     */
    private Map<String, Object> row;
    /**
     * 数据库操作
     */
    private String operation;
    /**
     * 操作发生的时间
     */
    private Long timeStamp;

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
        throw new java.io.NotSerializableException("tech.tongyu.binlog.bus.consumer.RelationalChangeData");
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
        throw new java.io.NotSerializableException("tech.tongyu.binlog.bus.consumer.RelationalChangeData");
    }
}